/**
 * Mutations 业务层数据提交
 *
 */
import storage from './../utils/storage'

export default {
     // 在state中储用户信息
    saveUserInfo (state, userInfo) {
        state.userInfo = userInfo;
        storage.setItem('userInfo', userInfo)
        console.log('userInfo=>', storage.getItem('userInfo'))
        console.log('state userInfo=>', state.userInfo)
    },
     // 在state中储存菜单信息
    saveUserMenu (state, menuList) {
        state.menuList = menuList;
        storage.setItem('menuList', menuList)
    },
    // 在state中储存按钮信息
    saveUserAction (state, actionList) {
        state.actionList = actionList;
        storage.setItem('actionList', actionList)
    },
}